<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>

	<body>
		<script type="text/javascript">
			var animals = [{
					species: 'Lion',
					name: 'King'
				},
				{
					species: 'Whale',
					name: 'Fail'
				}
			];

			for(var i = 0; i < animals.length; i++) {
				(function(i) {
						//console.log(this);
						console.log([].splice.call(arguments,1));
					this.print = function() {
						console.log('#' + i + ' ' + this.species + ': ' + this.name);
					}
					this.print();
				}).call(animals[i], i);
			}
		
		</script>
	</body>

</html>